home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1457 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.iddis.com!jarnot
  2. From: jarnot@iddis.com (Kevin J. Jarnot)
  3. Newsgroups: comp.unix.questions,comp.lang.c,comp.unix.programming
  4. Subject: Re: SIGBUS - What are the possible causes?
  5. Date: 13 Jan 1996 05:08:00 GMT
  6. Organization: IDD Information Services
  7. Message-ID: <JARNOT.96Jan13000800@box10.dstar.iddis.com>
  8. References: <4ct4es$3k7@news1.wolfe.net>
  9. Reply-To: jarnot@iddis.com
  10. NNTP-Posting-Host: box10.dstar.iddis.com
  11. To: mcguire@wolfe.net (McGuire)
  12. In-reply-to: mcguire@wolfe.net's message of Tue, 09 Jan 1996 07:11:16 GMT
  13.  
  14. >>>>> "McGuire" == McGuire  <mcguire@wolfe.net> writes:
  15.  
  16.     McGuire> Hello all, I am trying to compile a program under gcc
  17.     McGuire> 2.7.0 that works under the native HP-UX 9.05 cc.  In one
  18.     McGuire> routine I get a SIGBUS error.  When I ignore the SIGBUS
  19.     McGuire> error, I get a segmentation violation.  When I add some
  20.     McGuire> code to test what might be happening, the location at
  21.     McGuire> which the error occurs appears to change (I am using gdb
  22.     McGuire> under xemacs).  Does anyone have any ideas as to what the
  23.     McGuire> possible causes of such an error might be.
  24.  
  25.  
  26. Generally, a SIGBUS is the result of unaligned access to a memory 
  27. location (ie. grabbing a long from the target address+1).  I wouldn't
  28. ignore the signal, just as I wouldn't ignore a SIGSEGV.  
  29.  
  30. I'll bet that memory has become munged, making it look like the
  31. error is occurring all over the place.  You may have to go through
  32. the code (probably somewhere near where you see the majority
  33. of errors) by hand.
  34.  
  35. Kevin
  36.  
  37.  
  38.  
  39. -- 
  40. Kevin J. Jarnot - Senior Software Engineer | mailto:jarnot@iddis.com 
  41. IDD Information Services  Waltham, MA      | http://www-cs.canisius.edu/~jarnot
  42.